package robo

type roboActionEnum = string

type roboActionStruct struct {
	PICK_BAG     roboActionEnum
	DROP_BAG     roboActionEnum
	PICK_CAP     roboActionEnum
	CAPPING      roboActionEnum
	TAKE_OFF_CAP roboActionEnum
	STACKING_CAP roboActionEnum
}

// 机械臂动作枚举
var RoboActionEnum = &roboActionStruct{
	PICK_BAG:     "PICK_BAG",
	DROP_BAG:     "DROP_BAG",
	PICK_CAP:     "PICK_CAP",
	CAPPING:      "CAPPING",
	TAKE_OFF_CAP: "TAKE_OFF_CAP",
	STACKING_CAP: "STACKING_CAP",
}

var roboActionMap = map[roboActionEnum]string{
	RoboActionEnum.PICK_BAG:     "抓袋",
	RoboActionEnum.DROP_BAG:     "放袋",
	RoboActionEnum.PICK_CAP:     "抓盖（顶盖垛）",
	RoboActionEnum.CAPPING:      "封盖（笼箱）",
	RoboActionEnum.TAKE_OFF_CAP: "取盖（笼箱）",
	RoboActionEnum.STACKING_CAP: "放盖（顶盖垛）",
}

// 获取机械臂动作枚举相应中文描述
func GetRoboActionDesc(code roboActionEnum) string {
	if action, ok := roboActionMap[code]; ok {
		return action
	}
	return "未知类型"
}
